<template>
    <div>login</div>
    <router-link to="/register">没有注册去注册？</router-link>
    <el-button @click="gotoPage">跳转</el-button>
    <el-button @click="login">登录</el-button>
</template>

<script lang='ts' setup>
import {useRouter,useRoute} from "vue-router"
import {loginApi} from "@/apis/UserApi"
const $router = useRouter()
const $route = useRoute()
const gotoPage = () => {
    $router.push("/register?id=1")
}

const login =async ()=>{
    const res = await loginApi({username:"mrbird",password:"1234qwer"})
    console.log(res)
}
</script>

<style lang='scss' scoped></style>